#!/bin/sh
# 
#

COUNT=`crontab -l | grep '/home/s/bin/watchpid ' | grep -v '#' | wc -l | awk '{print $1}'`
if [ $COUNT -lt 1 ]
then
	TMPCRON=/tmp/watchpid.cron.tmp
	crontab -l >$TMPCRON
	echo '' >>$TMPCRON
	echo '*/1 * * * * /usr/bin/lockf -t 0 /home/s/tmp/watchpid.lock /home/s/bin/watchpid >/dev/null 2>/dev/null' >>$TMPCRON
	crontab $TMPCRON
fi

